from abc import ABCMeta, abstractmethod
from typing import List, Dict

from hj_dataset_devkit import ObstacleCategory, BoundingBox, Scene, Obstacle

__all__ = ['RoughBox', 'ObjRefiner']

class RoughBox:
    def __init__(self, id_, category: ObstacleCategory, bbox: BoundingBox,
                 score: float, timestamp: int, scene_name: str) -> None:
        self.id = id_
        self.category = category
        self.bbox = bbox
        self.score = score
        self.timestamp = timestamp
        self.scene_name = scene_name

class ObjRefiner(metaclass=ABCMeta):
    @abstractmethod
    def __init__(self) -> None:
        pass

    @abstractmethod
    def process(self, scene: Scene, track_res: List[RoughBox]) -> Dict[int, List[Obstacle]]:
        pass
